package com.rayson.oneapi.model.req.user;

import com.rayson.oneapi.model.enums.UserRoleEnum;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;


@Data
public class UserAddRequest implements Serializable {

    /**
     * 账号
     */
    @NotBlank(message = "用户名不能为空")
    @Length(min = 4, message = "用户名不能少于4位")
    private String username;

    /**
     * 用户角色: user, admin
     */
    private String userRole = UserRoleEnum.USER.getValue();

    private static final long serialVersionUID = 1L;
}